export default [
  {
    path: '/welcome',
    name: '首页',
    icon: 'smile',
    component: './analysis',
    // hideInMenu: getHideInMenu('/account'),
  },
  {
    path: '/show_interface',
    name: '接口调用',
    icon: 'BranchesOutlined',
    component: './ShowList',
    // hideInMenu: getHideInMenu('/account'),
  },
  {
    path: "/show_collected",
    name: '我的收藏',
    icon: 'HeartOutlined',
    component: './LoveList',
    // hideInMenu: getHideInMenu('/account'),
  },
  {
    path: '/show_interface_detail/:id',
    name: '接口信息',
    hideInMenu: true,
    layout: 'top',
    component: './ShowList/DetailMes',
  },
  {
    path: '/user',
    layout: false,
    routes: [
      { name: '登录', path: '/user/login', component: './User/Login' },
      { name: '注册', path: '/user/register', component: './User/Register' },
    ],
  },
  {
    name: '管理员功能',
    icon: 'table',
    access: 'canAdmin',
    path: '/admin',
    defaultOpen: true,
    routes: [
      {
        name: '接口管理',
        path: '/admin/interface_control',
        component: './AdminList',
      },
      {
        name: '申请请求处理',
        icon: 'SolutionOutlined',
        path: '/admin/admin_process_apply',
        component: './AdminProcessApply',
      },
    ],
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    path: '/account',
    layout: 'top',
    hideInMenu: true,
    routes: [
      {
        path: '/account',
        redirect: '/account/center',
      },
      {
        name: ' ',
        path: '/account/center',
        component: './account/center',
      },
      {
        name: ' ',
        path: '/account/settings',
        component: './account/settings',
      },
      {
        name: '申请开通',
        path: '/account/applyInterface/:id',
        component: './account/ApplyInterface',
      },
    ],
  },
  {
    path: '*',
    layout: false,
    component: './404',
  },
  {
    path: '/success',
    layout: 'top',
    component: './account/ApplyInterface/applyStatus/success.tsx',
  },
  {
    path: '/error',
    layout: 'top',
    component: './account/ApplyInterface/applyStatus/error.tsx',
  },
];
